String=input("请输入字符串\n")

strCount=0
numCount=0
spaceCount=0
otherCount=0
for i in String:
    if(str.isalpha(i)):
        strCount+=1
    elif(str.isdigit(i)):
        numCount+=1
    elif(str.isspace(i)):
        spaceCount+=1
    else:
        otherCount+=1
print("字符有 %d 个，数字有 %d 个，空格有 %d 个，其他类有 %d 个"%(strCount,numCount,spaceCount,otherCount))
